 /*
  *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
  *
  */
 package com.leeler.controller;

 import com.leeler.feign.AccontServerFeignClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;

 /**
  * @program: demo
  * @description: TODO
  * @author: lile
  * @create: 2019-08-21 18:13
  **/
 @RestController
 public class UserInfoController {


     @Autowired
     private AccontServerFeignClient accontServerFeignClient;

     @GetMapping("userinfo")
     public String queryUserInfo(@RequestParam("userId") String userId) {
         String balace = accontServerFeignClient.queryUserAccount(userId);
         System.out.println(userId);
         String message = String.format("hello,user[%s],your blance is [%s]", userId, balace);
         return message;
     }
 }
